@include('Admin.public.head')
<body>
@include('Admin.public.menu')
@include('Admin.public.head')
<style type="text/css">
#my-popup {
    max-height: 320px;}   
</style>
<body>
@include('Admin.public.menu')
<!-- 引入样式 -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<div class=" admin-content" id="app">
    {{ csrf_field() }}
<div class="daohang">
		<ul>
			<li><button type="button" class="am-btn am-btn-default am-radius am-btn-xs"> 首页 </li>
			<li><button type="button" class="am-btn am-btn-default am-radius am-btn-xs">帮助中心<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close="">×</a></button></li>
			<li><button type="button" class="am-btn am-btn-default am-radius am-btn-xs">奖金管理<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close="">×</a></button></li>
			<li><button type="button" class="am-btn am-btn-default am-radius am-btn-xs">产品管理<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close="">×</a></button></li>
		</ul>
</div>




<div class="admin-biaogelist">
    <div class="listbiaoti am-cf">
      <ul class="am-icon-users"> 权限列表</ul>

      <dl class="am-icon-home" style="float: right;">当前位置： 首页 > <a href="#">权限列表</a></dl>

      <!-- <dl>
        <button type="button" data-am-modal="{target: '#my-popup'}" class="am-btn am-btn-danger am-round am-btn-xs am-icon-plus" >
         新增角色
       </button>
      </dl> -->
      <!--这里打开的是新页面-->
    </div>

    <form class="am-form am-g" action="/admin/roles/{{$role->id}}/permission" method="POST">
    <input type="hidden" name="_token" value="{{ csrf_token() }}">    
    <div class="am-form-group">
      @foreach($permissions as $permission)
      <label class="am-checkbox-inline">
        <input type="checkbox" name="permissions[]"
         @if ($myPermissions->contains($permission))
         checked
         @endif
         value="{{$permission->id}}"> {{$permission->description}}
      </label><br>
      @endforeach
    </div>
       <button type="submit" class="am-btn am-btn-primary">提交</button>
       <div style="margin-top:20px;"></div>
      </form>
    </div>  
<!-- 引入组件库 -->

@include('Admin.public.foot')